SlkStore.ChangeLearnerAssignmentState Method (LearnerAssignmentItemIdentifier, LearnerAssignmentState)

Changes the LearnerAssignmentState of a learner assignment.

Parent Type: SlkStore

Namespace: Microsoft.SharePointLearningKit

Assembly: Microsoft.SharePointLearningKit.dll

Syntax
C#

public void ChangeLearnerAssignmentState (
LearnerAssignmentItemIdentifier learnerAssignmentId,
LearnerAssignmentState newStatus

)

Parameters

learnerAssignmentId

The ID of the learner assignment to change the LearnerAssignmentState of.

newStatus

The LearnerAssignmentState to transition this learner assignment to. See Remarks for more information.

Return Value

true if the state transition succeeded, false if the state transition failed because that state transition is not supported. If any other error occurs while performing this operation, an exception is thrown.

Exceptions
Exception type Condition
InvalidOperationException

The requested state transition is not supported.

SafeToDisplayException

An error occurred that can be displayed to a browser user. Possible cause: the user doesn't have the right to switch to the requested state.

Remarks

Only the following state transitions are supported by this method:

Security:  Fails if the current user doesn't have the right to switch to the requested state.